<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h1>{{msg}}</h1>
        <h2 v-text="msg2"></h2>
        <button @click="show()">按钮</button>
        <div v-html="htmlContent"></div>
        <div>{{ htmlContent?htmlContent:'没内容' }}</div>
    </div>
    <script src="../vue.min.js"></script>
    <script>
        new Vue({
            el:'#app',
            data:{
                msg:'hello vuejs',
                msg2:'你好,世界',
                htmlContent:"<p style='color:red'>html 内容</p>"
            },
            methods:{
                show:function(){
                    alert(11);
                }
            }
        });
    </script>
</body>
</html>